<div id="event-id" class="hidden" data-event-id=<%= current_event.id %>></div>
<div id="attendee-id" class="hidden" data-attendee-id=<%= session[:attendee_id] %>></div>
<div id="rfid-num" class="hidden" data-rfid-num=<%= Attendee.find(session[:attendee_id]).rfid_num %>></div>
<div id="show-qrcode" class="hidden" data-show-qrcode=<%=@attendee.login_count>1? false : true %>></div>
<div id="attendee-token" class="hidden" data-attendee-token=<%=@attendee.token%>></div>
<div id="event-link" class="hidden" data-event-link=<%= @event.event_link %>></div>
<div id="current_event_question" class="hidden" data-current-event-question=<%= @current_event_question.try(:id) %>></div>

<title><%= @event.name %></title>
<div class="container">
  <div class="row load-page">
    <div class="load-area text-center">
      <%= image_tag 'client/sites/loading.gif' %>
      <p>正在加载中</p>
    </div>
  </div>
  <div class="row home-page">
    <div class="page0">
      <div class="logo-area">
        <img src=<%= current_event.event_logo.url %> class="logo-img" />
      </div>
      <div class="col-xs-12 all-page">
        <div class="col-xs-12 profiles-area">
          <div class="col-xs-4 text-center">
            <button type="button" class="portrait-img-area">
              <% img_url = (@img.present? ? @img : image_path('cloudsignin-confirmation-camera.png')) %>
              <%= image_tag  img_url, class:"portrait-img", id: "attendee_photo"%>
            </button>
            <form action="/client/events/<%= current_event.id %>/upload_photo.json?id=<%= @attendee.id %>" method="post" id="formId" multipart='true' enctype="multipart/form-data">
              <input type="file" id="pic-portrait" name="file" />
            </form>
          </div>

          <div class="col-xs-8 portrait-msg">
            <span class="user-name"><%= @attendee.name %></span>
            <span class="user-company"><%= @attendee.company.present? ? @attendee.company : '公司未知' %></span>
            <span class="user-phone"><%= @attendee.mobile.present? ? @attendee.mobile : '电话未知' %></span>
          </div>
        </div>
        <div class="col-xs-12 illus-area">
          <%= image_tag 'client/sites/sites_illus.png', class:"img-responsive" %>
        </div>
        <div class="col-xs-12 notice-area">
          <div class="notice-img">
            <%= image_tag 'client/sites/notice.png' %>
            <span>公告：</span>
          </div>
          <marquee behavior="scroll" class="scroll-area">
            <span class="notice-msg">暂无公告</span>
          </marquee>
        </div>
      </div>
      <div class="col-xs-12 function-area">
        <table>
          <tbody>
            <!-- <tr>
              <td>
                <%= link_to client_event_event_sessions_path(current_event) do %>
                  <%= image_tag 'client/sites/schedule.png' %>
                  <span>会议日程</span>
                <% end %>
              </td>
              <td>
                <a href="javascript:void(0);" class="voucher-button">
                  <%= image_tag 'client/sites/voucher.png' %>
                  <span>入场凭证</span>
                </a>
              </td>
              <td>
                <a href="javascript:void(0);" class="seat-button">
                  <%= image_tag 'client/sites/seat.png' %>
                  <span>座位查询</span>
                </a>
              </td>
            </tr>
            <tr>
              <td>
                <%= link_to client_event_restaurants_path(current_event) do %>
                  <%= image_tag 'client/sites/hotel.png' %>
                  <span>酒店信息</span>
                <% end %>
              </td>
              <td>
                <%= link_to client_event_recommends_path(current_event) do %>
                  <%= image_tag 'client/sites/periphery.png' %>
                  <span>周边推荐</span>
                <% end %>
              </td>
              <td>
                <a href=<%= @event.event_link %>>
                  <%= image_tag 'client/sites/official_website.png' %>
                  <span>官方网站</span>
                </a>
              </td>
            </tr> -->
          </tbody>
        </table>
      </div>
    </div>
    <div class="col-xs-12 voucher-area text-center voucher-page hidden">
      <p class="voucher-msg">您的入场凭证</p>
      <div class="col-xs-6 col-xs-offset-6 qrcode-all-area">
        <div class="qrcode-area">
          <!--
            <div id="qrcode"></div>
          -->
          <img src="/attendee_qrcode/<%= current_event.id %>_<%= @attendee.id %>.png">
        </div>
      </div>
      <div class="qrcode-content">
        <a href="/client/events/<%= current_event.id %>/download_qrcode?id=<%= @attendee.id %>">
          <%= image_tag 'client/sites/arrow.png', class:"qrcode-button" %>
          <!-- <p class="down-msg" id="down-load-info">请点击下载按钮</p> -->
        </a>
        <p>长按图片保存二维码<br>并在办理签到时出示</p>
      </div>
    </div>
    <div class="col-xs-12 seat-area text-center seat-page hidden">
      <div class="seat-show-area">
        <p class="seat-user-name"><span><%= @attendee.name %></span> 先生/女士，您的座位</p>
        <div class="seat-number-area">
          <%= image_tag 'client/sites/seat_number.png'%>
          <span class="seat-number" style='font-size: 13px;'>查询中</span>
        </div>
      </div>
    </div>
  </div>
</div>
<% content_for :style do %>
  <%= stylesheet_link_tag 'client_sites_show', media: 'all' %>
<% end %>

<% content_for :script do %>
<%= javascript_include_tag 'https://cdn.bootcss.com/dropzone/5.1.1/dropzone.js' %>
<%= javascript_include_tag 'http://www.luqidong.com/demo/qrcode/js/qrcode.js' %>
<%= javascript_include_tag 'client_sites_show' %>
<% end %>
